* Replication code for 'What Drives Unequal Policy Responsiveness? Assessing the Role of Informational Asymmetries in Economic Policy-Making'

************ Main Text ************
use "DK_final.dta", clear
preserve
g s=1 if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266
keep if s==1

* Table 1: Policy influence regressions
xtset scode year
 reg spend2 pre_1 pre_50 pre_99, cluster(scode)
 reg spend2 pre_1 pre_50 pre_99 c.trend##c.trend, cluster(scode)  
 xtreg spend2 pre_1 pre_50 pre_99, fe robust
 xtreg spend2 pre_1 pre_50 pre_99 c.trend##c.trend, fe robust

	* joint significance:
xtreg spend2 pre_1 pre_50 pre_99, fe robust
 testparm pre_50 pre_99
  
xtreg spend2 pre_1 pre_50 pre_99 c.trend##c.trend, fe robust
 testparm pre_50 pre_99
restore

* Public responsiveness regressions
preserve 
keep if pre_1!=.

sort scode year
foreach v of varlist pre_1 pre_50 pre_99 unemp spend_levels_std year {
bysort scode: g change`v' =  (`v'[_n]-`v'[_n-1])
}

* Table 2
reg changepre_1 changeunemp  if changeyear<5
reg changepre_50 changeunemp  if changeyear<5
reg changepre_99 changeunemp if changeyear<5 
reg changepre_1 changeunemp changespend_levels_std if changeyear<5
reg changepre_50 changeunemp changespend_levels_std if changeyear<5
reg changepre_99 changeunemp changespend_levels_std if changeyear<5 
restore
 
 
************ Web Appendix B ************
use "DK_final.dta", clear
xtset scode year

* Table B1. Bivariate regression models with outliers
 reg spend2 pre_1, cluster(scode)
 reg spend2 pre_50, cluster(scode)
 reg spend2 pre_99, cluster(scode)
 xtreg spend2 pre_1, fe robust
 xtreg spend2 pre_50, fe robust
 xtreg spend2 pre_99, fe robust

* Table B2. Multiple regression models with outliers
 reg spend2 pre_1 pre_50 pre_99, cluster(scode)
 reg spend2 pre_1 pre_50 pre_99 c.trend##c.trend, cluster(scode)
 xtreg spend2 pre_1 pre_50 pre_99, fe robust
 xtreg spend2 pre_1 pre_50 pre_99 c.trend##c.trend , fe robust
 
************ Web Appendix C ************  
use "DK_final.dta", clear
preserve
g s=1 if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266
keep if s==1
xtset scode year
 
* Table C1. Bivariate alignment models, FE
 xtreg spend2 pre_1, fe robust
 xtreg spend2 pre_50, fe robust
 xtreg spend2 pre_99, fe robust
restore

* Table C2: Excluding obs from the panel and midway-election surveys
xtset scode year
 reg spend2 pre_1 pre_50 pre_99 if year!=2000 & year!=2001 & year!=2003, cluster(scode)
 reg spend2 pre_1 pre_50 pre_99 c.trend##c.trend if year!=2000 & year!=2001 & year!=2003, cluster(scode)
 reg spend2 pre_1 pre_50 pre_99 if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266 & year!=2000 & year!=2001 & year!=2003, cluster(scode)
 reg spend2 pre_1 pre_50 pre_99 c.trend##c.trend if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266 & year!=2000 & year!=2001 & year!=2003, cluster(scode)
 xtreg spend2 pre_1 pre_50 pre_99 if  year!=2000 & year!=2001 & year!=2003, fe robust
 xtreg spend2 pre_1 pre_50 pre_99 c.trend##c.trend if  year!=2000 & year!=2001 & year!=2003, fe robust
 xtreg spend2 pre_1 pre_50 pre_99 if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266 & year!=2000 & year!=2001 & year!=2003, fe robust
 xtreg spend2 pre_1 pre_50 pre_99 c.trend##c.trend if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266 & year!=2000 & year!=2001 & year!=2003, fe robust

* Table C3: One-year changes
 reg spend1 pre_1 pre_50 pre_99 if v1!=255  & v1!=393 & v1!=514  & v1!=523 & v1!=541 & v1!=548, cluster(scode)
 reg spend1 pre_1 pre_50 pre_99 c.trend##c.trend if v1!=255  & v1!=393 & v1!=514  & v1!=523 & v1!=541 & v1!=548, cluster(scode)
 xtreg spend1 pre_1 pre_50 pre_99 if v1!=255  & v1!=393 & v1!=514  & v1!=523 & v1!=541 & v1!=548, fe robust
 xtreg spend1 pre_1 pre_50 pre_99 c.trend##c.trend if v1!=255  & v1!=393 & v1!=514  & v1!=523 & v1!=541 & v1!=548, fe robust
 reg spend1 pre_1 pre_50 pre_99, cluster(scode)
 reg spend1 pre_1 pre_50 pre_99 c.trend##c.trend, cluster(scode)
 xtreg spend1 pre_1 pre_50 pre_99 , fe robust
 xtreg spend1 pre_1 pre_50 pre_99 c.trend##c.trend , fe robust
 
* Table C4: Including controls
preserve
g s=1 if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266
keep if s==1

xtset scode year
 reg spend2 pre_1 pre_50 pre_99 deficit unemp ma_partisan5, cluster(scode)
 reg spend2 pre_1 pre_50 pre_99 deficit unemp ma_partisan5 c.trend##c.trend, cluster(scode)
 xtreg spend2 pre_1 pre_50 pre_99 deficit unemp ma_partisan5, fe robust
 xtreg spend2 pre_1 pre_50 pre_99 deficit unemp ma_partisan5 c.trend##c.trend, fe robust
 
* Generating five-year and decade dummies
g five_year=1 if year<1990
 replace five_year=2 if year>=1990 & year <1995
 replace five_year=3 if year>=1995 & year <2000
 replace five_year=4 if year>=2000 & year <2005
 replace five_year=5 if year>=2005 & year <2010
 replace five_year=6 if year>=2010
  
g decade=1 if year<1990
 replace decade=2 if year>=1990 & year <2000
 replace decade=3 if year>=2000 & year <2010
 replace decade=4 if year>=2010
 
* Table C5: Five-year and decade dummies 
 reg spend2 pre_1 pre_50 pre_99 i.five_year, cluster(scode)
 xtreg spend2 pre_1 pre_50 pre_99 i.five_year, fe robust
 reg spend2 pre_1 pre_50 pre_99 i.decade, cluster(scode)
 xtreg spend2 pre_1 pre_50 pre_99 i.decade, fe robust

* Table C6: Including a LDV
 reg spend2 ldv2 pre_1, cluster(scode)
 reg spend2 ldv2 pre_50, cluster(scode)
 reg spend2 ldv2 pre_99, cluster(scode)
 reg spend2 ldv2 pre_1 pre_50 pre_99, cluster(scode)
 xtreg spend2 ldv2 pre_1, fe robust
 xtreg spend2 ldv2 pre_50, fe robust
 xtreg spend2 ldv2 pre_99, fe robust
 xtreg spend2 ldv2 pre_1 pre_50 pre_99, fe robust

* Table C7: random-effects models
 xtreg spend2 pre_1, re robust 
 xtreg spend2 pre_50, re robust 
 xtreg spend2 pre_99, re robust 
 xtreg spend2 pre_1 pre_50 pre_99, re robust 
 xtreg spend2 pre_1 c.trend##c.trend, re robust 
 xtreg spend2 pre_50 c.trend##c.trend, re robust 
 xtreg spend2 pre_99 c.trend##c.trend, re robust 
 xtreg spend2 pre_1 pre_50 pre_99 c.trend##c.trend, re robust 
restore

****** Including voters only
use "final_DK_voters.dta", clear
preserve
g s=1 if v1!=1 & v1!=514 & v1!=537 & v1!=272 & v1!=255 & v1!=297 & v1!=266
keep if s==1

* Table C8: Policy influence regressions, voters only
xtset scode year
 reg spend2 pre_1 pre_50 pre_99, cluster(scode)
 reg spend2 pre_1 pre_50 pre_99 c.trend##c.trend, cluster(scode)
 xtreg spend2 pre_1, fe robust
 xtreg spend2 pre_50, fe robust
 xtreg spend2 pre_99, fe robust
 xtreg spend2 pre_1 pre_50 pre_99, fe robust
 xtreg spend2 pre_1 pre_50 pre_99 c.trend##c.trend, fe robust
restore
 
* Public responsiveness regressions
use "DK_final.dta", clear
preserve 
keep if pre_1!=.

gen gap991 = pre_99-pre_1
gen gap9950 = pre_99-pre_50
gen gap501 = pre_50-pre_1

sort scode year
* change between to adjacent year obs
foreach v of varlist pre_1 pre_50 pre_99 gap991 gap9950 gap501 unemp spend_levels_std year {
bysort scode: g change`v' =  (`v'[_n]-`v'[_n-1])
}

**** Table C9. Robustness check: all years
reg changepre_1 changeunemp 
reg changepre_50 changeunemp
reg changepre_99 changeunemp

reg changepre_1 changeunemp changespend_levels_std 
reg changepre_50 changeunemp changespend_levels_std
reg changepre_99 changeunemp changespend_levels_std

* Table C10. Robustness check: change in preference gaps as DV
reg changegap501 changeunemp  if changeyear<5
reg changegap9950 changeunemp  if changeyear<5
reg changegap991 changeunemp if changeyear<5 
reg changegap501 changeunemp changespend_levels_std if changeyear<5 & v1!=227
reg changegap9950 changeunemp changespend_levels_std if changeyear<5  & v1!=403
reg changegap991 changeunemp changespend_levels_std if changeyear<5   & v1!=403
restore
 
************ Web Appendix D ************  
** Political/economic information

use "political_information.dta", clear

* Table D1. Informaiton about Politics
reg sd_pol_knowledge income disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.edu i.year
 g s2=1 if e(sample)
 
 reg sd_pol_knowledge income i.year if s2==1
 reg sd_pol_knowledge disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.year if s2==1
 reg sd_pol_knowledge income disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.year if s2==1
 reg sd_pol_knowledge income i.edu i.year if s2==1
 reg sd_pol_knowledge disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.edu i.year if s2==1
 reg sd_pol_knowledge income disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.edu i.year if s2==1
 
* Table D2. Informaiton about Economic Policy (self-evaluated) 
reg sd_forsta_oko income disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.edu i.year 
 g s1=1 if e(sample)
 
 reg sd_forsta_oko income i.year if s1==1
 reg sd_forsta_oko disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.year  if s1==1
 reg sd_forsta_oko income disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.year  if s1==1
 reg sd_forsta_oko income i.edu i.year  if s1==1
 reg sd_forsta_oko disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.edu i.year  if s1==1
 reg sd_forsta_oko income disc_pol_no disc_pol_fam disc_pol_friends disc_pol_col i.edu i.year  if s1==1

** Economic information
 use "economic_information.dta", clear
 recode disc_eco (1/3=0) (4/5=1), g(disc_eco_weekly)

* Table D3. Discussing economic issues
 ologit disc_eco income1
 ologit disc_eco income1 i.edu
 logistic disc_eco_weekly income1, coef
 logistic disc_eco_weekly income1 i.edu, coef

 logistic disc_eco_weekly income1
 margins, at (income1=(1 50 99)) 
 
* Table D4. Economic information
 reg sd_eco_know income1
 reg sd_eco_know i.disc_eco
 reg sd_eco_know income1 i.disc_eco
 reg sd_eco_know income1 i.edu
 reg sd_eco_know i.disc_eco i.edu
 reg sd_eco_know income1 i.disc_eco i.edu
